<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Math</title>
</head>
<body>
<script>
    document.write(Math.PI+"<br>");
    //输出π
    document.write(Math.random()+"<br>");
    //返回[0,1)之间的数
    document.write(Math.round(3.14)+"<br>");
    //四舍五入
    document.write(Math.ceil(3.14)+"<br>");
    //向上取整
    document.write(Math.floor(3.14)+"<br>");
    //向下取整
</script>
</body>
</html>